package com.z2.disruptor.comsumer;

import com.z2.disruptor.event.LongEvent;
import com.lmax.disruptor.EventHandler;

/**
 * Created by cdyizuoming on 2018/1/17.
 */
public class LongBatchEventHandler implements EventHandler<LongEvent> {


    public void onEvent(LongEvent event, long sequence, boolean endOfBatch) throws Exception {
        final String threadName = Thread.currentThread().getName();
        final Long ID = event.get();
        System.out.println(ID + "consumer 线程:" + threadName + " Event: value=" + event.get());
    }
}
